import { defineStore } from 'pinia';

export default defineStore('user', {
    state: () => ({
        userInfo: {},
        token: '',
    }),
    actions: {},
    // 开启数据缓存
    persist: {
        enabled: true,
        strategies: [
            {
                key: 'user',
                storage: localStorage,
                paths: ['token'],
            },
        ],
    },
});
